define(['egis'], function (egis) {
    Window.deserializer = Window.deserializer || new egis.core.Deserializer();
    Window.container = Window.container || {};
    dsBridge.register('create_RestWMPSService', function (sourceId, url, http, authType, clientId, clientSecret,tokenUrl) {
        var restHttp = Window.container[http];
        var restGeoService = new egis.ews.RestWMPSService({
            url: url,
            http: restHttp,
            deserializer: Window.deserializer,
            authType: authType,
            clientId: clientId,
            clientSecret: clientSecret,
            tokenUrl:tokenUrl
        });
        Window.container[sourceId] = restGeoService;
    })

    dsBridge.registerAsyn('RestWFSService_print', function (sourceId, wmpsInput, requestType) {
        var restWMPSService = Window.container[sourceId];
        wmpsInput = Window.deserializer.createJsInstance(JSON.parse(wmpsInput));
        restWMPSService.print(wmpsInput, requestType);
    })
})